

package com.hazelcast.client.impl.statistics;

import com.hazelcast.client.impl.ClientEndpoint;
import com.hazelcast.client.impl.protocol.task.ClientStatisticsMessageTask;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

/**
 * An immutable class representing the statistics sent by the clients
 * to the members.
 *
 * @see ClientStatisticsMessageTask
 * @see ClientEndpoint#setClientStatistics(ClientStatistics)
 * @see ClientEndpoint#getClientAttributes()
 */
public final class ClientStatistics {
    private final long timestamp;
    private final String clientAttributes;
    private final byte[] metricsBlob;

    @SuppressFBWarnings("EI_EXPOSE_REP2")
    public ClientStatistics(long timestamp, String clientAttributes, byte[] metricsBlob) {
        this.timestamp = timestamp;
        this.clientAttributes = clientAttributes;
        this.metricsBlob = metricsBlob;
    }

    public long timestamp() {
        return timestamp;
    }

    public String clientAttributes() {
        return clientAttributes;
    }

    @SuppressFBWarnings("EI_EXPOSE_REP")
    public byte[] metricsBlob() {
        return metricsBlob;
    }
}
